#define DP 32
#define WIDTH 512
#define HEIGHT 512

class sp
{public: sp();
 virtual~sp();

public:
	CWnd *hwnd;
	HWND hMCI;			//a hwnd loading midi music
	CDC *mdc,*mdc1,*map;
	CBitmap *temp,*bmp;	//temporary bitmap
	HBITMAP bitmap;		//a buffer loading bitmap
	CString cc,ch;		//a string
	BOOL tout;			//ready to textout
	int len,ii;			//length of cc
	char dir[256];		//current directory buffer
	int maze[50][50];	//map matrix
	int n;				//map tag
	int w,h;			//bitmap height/width
	int mh,mw;			//map height/width
	int t,d;			//time flag
	int ok;				//init device
	int meetmonster;	//meet monster
	int count;			//monster counter
	CPoint s;			//screen
	CPoint man,mon;
	UINT nChar;			//post keydown event
	UINT nIDEvent;		//post timerID
	BOOL chmap,moving;	//switch
	CFont font;

	BOOL init();
	void exit();
	void rmap();		//read from *.map
	void wmap();		//write to *.map
	void loading();
	void loadmap();
	BOOL loadbmp(CString name);
	void getpic(CString cc);
	void sp::TransparentBlt2( HDC hdc0,	
						int nX0,int nY0,
						int nW0,int nH0,
						  HDC hdc1,
						int nX1,int nY1,
						int nW1,int nH1,
						  UINT Tcol);
};